package com.lsa.helpers.tree.binary;

import java.util.Arrays;
import java.util.Collection;

import org.apache.commons.lang.ArrayUtils;

public class Test {
	public static void main(String[] args) {
		Base base = new Base();
		System.out.println(base.getResult());
		
		base = new Derived();
		System.out.println(base.getResult());
		
		int[] data = new int[]{8,3,10,1,6,14, 4,7,13};
		Collection<Integer> c = Arrays.asList(ArrayUtils.toObject(data));
		for (int i : c) {
			System.out.println(i);
		}
	}
	
	static class Base{
		public Result getResult(){
			return new Result();
		}
	}
	
	static class Derived extends Base{
		public DerivedResult getResult(){
			return new DerivedResult();
		}
	}
	
	static class Result{
		@Override
		public String toString() {
			return "Result";
		}
	}
	
	static class DerivedResult extends Result{
		@Override
		public String toString() {
			return "DerivedResult";
		}
	}
}

